#ifndef ADAPTERINTERFACE_H
#define ADAPTERINTERFACE_H

#include "interfaces.h"

class QIODevice;
class QSqlDatabase;
class DynamicModel;
class ServerModel;
class CoverageModel;
class UseCaseModel;
class UseCase;
class QDir;

class DynamicModelAdapterPluginInterface : public PluginInterface
{
public:
    virtual DynamicModel * createModel(QIODevice * source) = 0;
    virtual bool loadSettings() = 0;
};

Q_DECLARE_INTERFACE(DynamicModelAdapterPluginInterface, "arsillustrator/dynamicmodeladapterplugininterface/1.0")

class StaticModelAdapterPluginInterface : public PluginInterface
{
public:
    virtual bool connectToDatabase(const QString & host, int port, const QString & dbName,
                                   const QString & login, const QString & password) = 0;
    virtual ServerModel * createModel() = 0;
};

Q_DECLARE_INTERFACE(StaticModelAdapterPluginInterface, "arsillustrator/staticmodeladapterplugininterface/1.0")

class StaticModelFileAdapterPluginInterface : public PluginInterface
{
public:
    virtual ServerModel * createModel(QIODevice * device) = 0;
//    virtual bool saveModel(StaticModel * model, const QString & fileName) = 0;
};

Q_DECLARE_INTERFACE(StaticModelFileAdapterPluginInterface, "arsillustrator/staticmodelfileadapterplugininterface/1.0")

class CoverageModelXMLAdapterPluginInterface : public PluginInterface
{
public:
    virtual bool saveModel(CoverageModel * model, QIODevice * dest) = 0;
};

Q_DECLARE_INTERFACE(CoverageModelXMLAdapterPluginInterface, "arsillustrator/coveragemodelxmladapterplugininterface/1.0")

class CoverageModelHTMLAdapterPluginInterface : public PluginInterface
{
public:
    virtual bool saveModel(CoverageModel * model, const QDir & dir, const QString & version) = 0;
};

Q_DECLARE_INTERFACE(CoverageModelHTMLAdapterPluginInterface, "arsillustrator/coveragemodelhtmladapterplugininterface/1.0")

class UseCaseDBAdapterInterface : public PluginInterface
{
public:
    virtual bool connectToDatabase() = 0;
    virtual QStringList loadModelList() = 0;
    virtual bool addModel(const QString & name, DynamicModel * model) = 0;
    virtual DynamicModel * loadModel(int modelID) = 0;
};

Q_DECLARE_INTERFACE(UseCaseDBAdapterInterface, "arsillustrator/usecasedbadapterwinterface/1.0")


#endif // ADAPTERINTERFACE_H
